package com.example.henry.yindu.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.henry.yindu.R;

/**
 * Created by Henry on 2018/4/6.
 */

public class MineFragment extends Fragment {
    private Toolbar toolbar;
    private AppCompatActivity appCompatActivity;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.mine_fragment, container, false);
        appCompatActivity = (AppCompatActivity)getActivity();

        return view;
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceStatus) {
        super.onViewCreated(view, savedInstanceStatus);
        initToobar();
    }
    private void initToobar() {
        toolbar = (Toolbar)appCompatActivity.findViewById(R.id.toolbar4);
        toolbar.setTitle("我的");
        appCompatActivity.setSupportActionBar(toolbar);
    }
}
